package com.tl.demo;

import java.io.FileInputStream;

import org.apache.poi.hwpf.extractor.WordExtractor;
public class TestPoi {
	public TestPoi() {
	}

	public static void main(String args[]) throws Exception {
		FileInputStream in = new FileInputStream("D:\\test.doc");
		WordExtractor ex = new WordExtractor(in);
		String str = ex.getText();
		// System.out.println("the result length is"+str.length());
		System.out.println(str);
	}
}